<template>
    <div class="tmpl"> 
        <mt-header :title="title">
        <div @click="goback" slot="left">
            <mt-button icon="back">返回</mt-button>
        </div>
        <mt-button icon="more" slot="right"></mt-button>
        </mt-header>
    </div>
</template>
<script>
export default {
    name:'nav-bar',
    props:['title'],//props属性在template中可以直接使用
    created(){
        //在这里就使用this.title
    },
    data(){
        return {
           
        }
    },
    methods:{
        goback(){
            this.$router.go(-1);
        }
    }
}
</script>
<style scoped>
.tmpl .mint-header{
background-color: yellowgreen;
}
</style>
